of

open fun of(from: Int, to: Int): PageRange

Creates a new page range instance.

The specified range must not exceed the total page count received with the PageCountUpdated event. An attempt to print a document with invalid page range will result in cancelling the printing operation.

Parameters

from

the 1-based number of the first page within the range

to

the 1-based number of the last page within the range

Throws

if from is greater than to, or if from is less than one